<?php
session_start ();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../u_css/searchResult.css" rel="stylesheet" type="text/css" />
<title>搜索结果</title>
</head>
<body>
<?php
include '../include_htmls/header.php';
require '../mysql_connection/for_u_lijinsheng.php';

if (isset ( $_GET ['id'] )) {
	if (isset ( $_SESSION ['goods'] )) {
		$_SESSION ['goods'] [count ( $_SESSION ['goods'] )] = $_GET ['id'];
	} else {
		$_SESSION ['good'] = array ($_GET ['id'] );
	}
	unset ( $_GET ['id'] );
}
$searchType = $_GET ["goodType"];
$lowestPrice = $_GET ["lowestPrice"];
$highestPrice = $_GET ["highestPrice"];
$date = $_GET ["year"] . " " . $_GET ["month"] . " " . $_GET ["day"];
$searchResult = search_Good ( $searchType, $lowestPrice, $highestPrice );
?>
<div id="body">
<?php
for($i = 0; $i < count ( $searchResult ); $i ++) {
	?>
	<div class="good">
<hr />
<a id="image"
	href="http://localhost/e-commerce/user_php/goods_detail.php?id=<?=$searchResult [$i] [0]?>">
<img src="<?=$searchResult [$i] [3]?>"></img></a>

<div id="info"><a
	href="http://localhost/e-commerce/user_php/goods_detail.php?id=<?=$searchResult [$i] [0]?>">产品名称：<?=$searchResult [$i] [1]?></a>
<p>产品价格：$<?=$searchResult [$i] [2]?></p>
</div>
<hr />
</div>
<?php
}
?>
</div>
<?php
include '../include_htmls/footer.html';
?>
</body>
</html>